﻿<%@ Page Language="C#" MasterPageFile="~/Shared/MainPage.Master" AutoEventWireup="true" CodeBehind="AccessorySetting.aspx.cs" Inherits="Runda.CMS.Portal.ContractFollowUp.AccessorySetting" StylesheetTheme="GlobleTheme" %>

<%@ Register Assembly="RadGrid.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>
<%@ Register Assembly="RadWindow.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphHead" runat="server">
    <link href="../Content/global.css" rel="stylesheet" type="text/css" /> 
    <link href="../Content/Find/find.css" rel="stylesheet" type="text/css" />
     <link href="../Content/Menu/Menu.css" rel="stylesheet" type="text/css" /> 
     
     <script type="text/javascript">
        function AddAItem() {
            radopen('AccessorySettingAdd.aspx?Type=' + document.getElementById('<%=hidType.ClientID %>').value, 'winAddItem');
            return false;
        }

        function OnAddItemCallback(radWindow) {
            if (radWindow != undefined) {
                if (radWindow.Argument != '' && radWindow.Argument != null) {

                    RefreshItems();
                }
            }
        }

        function RefreshItems() {
            document.getElementById('<%=btnRefresh.ClientID %>').click();
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphBody" runat="server">
 <rad:RadWindowManager ID="RadWindowManager1" runat="server">
    <Windows>  
        <rad:RadWindow ID="winAddItem" runat="server" Title="添加" Height="400px" Width="500px" ReloadOnShow="true" Modal="true" OnClientClose="OnAddItemCallback"/> 
        <rad:RadWindow ID="winEditItem" runat="server" Title="修改" Height="400px" Width="500px" ReloadOnShow="true" Modal="true" OnClientClose="OnAddItemCallback"/> 
    </Windows>
</rad:RadWindowManager>
    <div class="Container">
<table class="mnubar" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td style="padding-left: 5px" nowrap>
                        <b>
                            <asp:Literal ID="ltlTitle" runat="server"></asp:Literal>列表</b>
                    </td>
                    <td style="padding-left: 5px">
                        <img src="../Content/Grid/separator.gif">
                    </td>
                    <td class="icMenu" nowrap>
                       
                            <table id="appGridMenu_mainmnu" class="mnuList" cellspacing="0" cellpadding="3">
                                <colgroup>
                                    <col class="mnuLeft">
                                    <col class="mnuItm">
                                    <col align="right" width="20">
                                    <tbody>
                                        <tr tabindex="0"  action="getids()">
                                            <td>
                                            </td>
                                            <td colspan="2" nowrap>
                                                
                                            </td>
                                        </tr>
                                    </tbody>
                            </table>
                        </span>
                    </td>
                    <td class="icMenu mnuRight" nowrap> 
                     <span class="menu"  onclick="return RefreshItems();">
                            <img class="mnuBtn" src="../Images/16_L_refresh.gif"><span class="mnuBtn">刷新</span></span>
                     <span class="menu"  onclick="return AddAItem();">
                            <img class="mnuBtn" src="../Content/Grid/New_16_blue.gif"><span class="mnuBtn">添加新项</span></span>
                    </td>
                </tr>
            </tbody>
        </table>       
         
        <div style="border-bottom: #c2c2bf 1px solid; border-top: #969693 1px solid">
        </div>
<rad:RadGrid runat="server" ID="DictionaryList" Skin="OCM" AutoGenerateColumns="False" 
            AllowPaging="true" PageSize="10" onitemcommand="DictionaryList_ItemCommand" 
            onneeddatasource="DictionaryList_NeedDataSource" 
            onitemdatabound="DictionaryList_ItemDataBound">
    <MasterTableView DataKeyNames="ID" AllowPaging="true" PageSize="10"> 
        <Columns> 

            <rad:GridBoundColumn DataField="Name" HeaderText="名称">
            </rad:GridBoundColumn> 
            <rad:GridTemplateColumn HeaderText="操作">
                <ItemTemplate>
                    <asp:LinkButton ID="lnkbtnEdit" runat="server">修改</asp:LinkButton>
                    &nbsp;
                    <asp:LinkButton ID="lnkbtnDelete" runat="server" CommandName="Delete">删除</asp:LinkButton> 
                </ItemTemplate>
            </rad:GridTemplateColumn>
        </Columns> 
    </MasterTableView>
</rad:RadGrid>  
</div>
    <asp:Button ID="btnRefresh" runat="server" Text="Button" style="display:none" onclick="btnRefresh_Click" />
                             <asp:HiddenField runat="server" ID="hidType" />
</asp:Content>
